TrafficLight Class Reference

#include <TrafficLight.h>

Inheritance diagram for TrafficLight:

TraffEduObject List of all members.

Public Member Functions

 TrafficLight (OSGWindows *osgwind__)
 TrafficLight (OSGWindows *osgwind, TrafficLightTypes newType, TrafficLightColor newColor, TrafficLightColor newArrowColor=YESIL)
 ~TrafficLight ()
void setColor (TrafficLightColor color)
void draw (osg::ref_ptr< osg::Group > root, int animationFlag=-1)
TrafficLightColor getColor ()
TrafficLightColor getArrowColor ()
TrafficLightTypes getTrafficLightType ()
void setNewFramesLightColor (int oldFrameId, int newFrameId)
void changeColor (int frameId)
void changeColorAnim (int frameId)
void fillColorArray (TrafficLightColor newcolor)
TrafficLightColor getFrameColor (int frameId)
void setFrameColor (int frameId, int color)

Public Attributes

osg::ref_ptr< osg::Sequence > seqNode

Private Attributes

TrafficLightTypes lightType
TrafficLightColor color
TrafficLightColor arrowColor
int colorArray [101]
OSGWindows * osgwind_

Detailed Description

TrafficLight class. A data fundemental class for Traffic Lights.


Constructor & Destructor Documentation

TrafficLight::TrafficLight (  OSGWindows *  osgwind__  ) 
 

Constructor for the Traffic Light. The Ligth is created with default parameters.

Parameters:
osgwind__ a pointer to the OSGWindows in which the object will be created.
See also:
TrafficLight();

TrafficLight::TrafficLight (  OSGWindows *  osgwind,
TrafficLightTypes  newType,
TrafficLightColor  newColor,
TrafficLightColor  newArrowColor = YESIL
) 
 

Constructor for the Traffic Light.

Parameters:
osgwind a pointer to the OSGWindows in which the object will be created.
newType type of the traffic light
newColor color of the light
newArrowColor color of the arrow.
See also:
TrafficLight();

TrafficLight::~TrafficLight (   ) 
 

A destructor for the Traffic Light.


Member Function Documentation

void TrafficLight::changeColor (  int  frameId  ) 
 

Responsible from the color change of the Traffic Light.

Parameters:
frameId specifies in which frame to change the color

void TrafficLight::changeColorAnim (  int  frameId  ) 
 

Resonsible from changing the color of the Traffic Light during animation.

Parameters:
frameId specifies in which frame to change the color

void TrafficLight::draw (  osg::ref_ptr< osg::Group >  root,
int  animationFlag = -1
)  [virtual]
 

The function responsible from the addition of Traffic Light to the scene root.

Parameters:
root osg::ref_ptr<osg::Group> where to add the light object.
animationFlag whether the object is an active object in the animation.

Implements TraffEduObject.

void TrafficLight::fillColorArray (  TrafficLightColor  newcolor  ) 
 

Responsible from filling the color array of a TrafficLight. Each Traffic Light holds a coor array in which they hold the color values of the light in each frame.

Parameters:
newcolor variable of enum type TrafficLightColor

TrafficLightColor TrafficLight::getArrowColor (   )  [inline]
 

Getter for the arrow color of the TrafficLight

Returns:
TrafficLightColor

TrafficLightColor TrafficLight::getColor (   )  [inline]
 

Getter for the color of the TrafficLight

Returns:
TrafficLightColor

TrafficLightColor TrafficLight::getFrameColor (  int  frameId  ) 
 

Getter for the color of the TrafficLigth for a specific frame.

Parameters:
frameId the identifier for the frame.
Returns:
color of the TrafficLight.

TrafficLightTypes TrafficLight::getTrafficLightType (   )  [inline]
 

Getter for the type of the TrafficLight

Returns:
TrafficLightType

void TrafficLight::setColor (  TrafficLightColor  color  ) 
 

Setter for the light of the Traffic Light.

Parameters:
color a variable to which color to set the light.

void TrafficLight::setFrameColor (  int  frameId,
int  color
) 
 

Setter for the color of TrafficLight for a specific frame.

Parameters:
frameId the identifier for the frame.
color specifies the color to set

void TrafficLight::setNewFramesLightColor (  int  oldFrameId,
int  newFrameId
) 
 

Setter for the color of the TrafficLight in frame

Parameters:
oldFrameId an integer variable
newFrameId an integer variable


Member Data Documentation

TrafficLightColor TrafficLight::arrowColor [private]
 

TrafficLightColor TrafficLight::color [private]
 

int TrafficLight::colorArray[101] [private]
 

TrafficLightTypes TrafficLight::lightType [private]
 

OSGWindows* TrafficLight::osgwind_ [private]
 

osg::ref_ptr<osg::Sequence> TrafficLight::seqNode
 

A public pointer to Sequence Node.


The documentation for this class was generated from the following file:
Generated on Sun May 28 18:44:01 2006 by  doxygen 1.4.6-NO